<?
	define('PS', 1);
	include_once("../../defines.php");
	
	include_once('header.php');

	$PageName = 'links';
	include_once(PUBLIC_BEHIND_DIRECTORY . $PageName . '.php');
?>
	
<script type="text/javascript">
	$(function(){
		$(".favouritePage").mouseenter(function(){
			$(this).find('span').addClass('hover');
		});

		$(".favouritePage").mouseleave(function(){
			$(this).find('span').removeClass('hover');
		});
		
		$(".favouritePage").click(function(){
			link = $(this).find('a').data("link");
			window.open(link);
		});
	});
</script>
<div id="linksContent" class="centerContent">
	<h1 class="titlePage">Links amigos:</h1>
	<ul>
		<?
		foreach ($arrLinks as $Link){
		?>
		<li class="inlineBlock">
			<div class="favouritePage inlineBlock">
				<a data-link="<?= $Link->getLink();?>" href="javascript:void(0);">
					<img src="<?= PUBLIC_IMAGES_FAVOURITE_PATH . $Link->getImage();?>" />
					<span><?= $Link->getName();?></span>
				</a>
			</div>
		</li>
		<? 
		}
		?>
	</ul>
</div>

<? include('footer.php'); ?>